package com.coderman.utils;

import org.csource.fastdfs.ClientGlobal;
import org.csource.fastdfs.StorageClient;
import org.csource.fastdfs.TrackerClient;
import org.csource.fastdfs.TrackerServer;

/**
 * @Author 冉冉
 * @Version 1.0
 */

public class UpLoadTest {
    public static void main(String[] args)throws Exception {
        ClientGlobal.init("E:\\TeachingResearchTasks\\新冠物资管理信息系统\\新冠物资管理信息系统\\源代码\\Xinguan\\xinguan-web\\src\\main\\resources\\fdfs_client.conf");
        //创建TrackerClient客户端
        TrackerClient trackerClient=new TrackerClient();
        //通过TrackerClient对象获取TrackerServer对象
        TrackerServer trackerServer=trackerClient.getConnection();
        //获取
        StorageClient storageClient=new StorageClient(trackerServer,null);
        //执行文件
        String[] file=storageClient.upload_file("E:\\TeachingResearchTasks\\新冠物资管理信息系统\\新冠物资管理信息系统\\images\\音乐图片2.jpg","jpg",null);
        for(String f:file){
            System.out.println(f);
        }

    }
}
